/* 知识库容器 - ID选择器 */
#knowledge-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow-y: auto;
}

/* 知识库容器 */
.knowledge-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow-y: auto;
}

.knowledge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.knowledge-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
}

.kb-add-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.kb-add-btn:hover {
    background-color: #3850d0;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.knowledge-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.kb-item {
    background-color: white;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.kb-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), #8b5cf6);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.kb-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: rgba(67, 97, 238, 0.2);
}

.kb-item:hover::before {
    opacity: 1;
}

.kb-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.kb-item-header i {
    color: var(--primary-color);
    font-size: 18px;
}

.kb-item-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}

.kb-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
    flex-grow: 1;
}

.kb-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #9ca3af;
}

.kb-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.kb-meta i {
    font-size: 14px;
}

.kb-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.kb-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    background-color: white;
    color: var(--text-secondary);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-height: 36px;
}

.kb-action-btn:first-child {
    color: var(--primary-color);
    border-color: rgba(67, 97, 238, 0.25);
    background-color: rgba(67, 97, 238, 0.04);
}

.kb-action-btn:first-child:hover {
    background-color: rgba(67, 97, 238, 0.08);
    border-color: rgba(67, 97, 238, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(67, 97, 238, 0.2);
}

.kb-action-btn:last-child {
    color: #6b7280;
    border-color: #e5e7eb;
    position: relative;
}

.kb-action-btn:last-child:hover {
    background-color: #f9fafb;
    color: #374151;
    border-color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.kb-action-btn:active {
    transform: translateY(0);
}

.kb-action-btn i {
    font-size: 14px;
}

/* 知识库管理菜单 */
.kb-manage-menu {
    position: absolute;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.08);
    width: 200px;
    z-index: 1000;
    overflow: hidden;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.kb-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--text-color);
    font-size: 14px;
    position: relative;
    user-select: none;
}

.kb-menu-item:hover {
    background-color: rgba(67, 97, 238, 0.06);
    color: var(--primary-color);
}

.kb-menu-item:active {
    background-color: rgba(67, 97, 238, 0.1);
    transform: scale(0.98);
}

.kb-menu-item i {
    font-size: 15px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.kb-menu-item span {
    font-weight: 500;
}

.kb-menu-item-separator {
    height: 1px;
    background-color: rgba(0, 0, 0, 0.08);
    margin: 4px 0;
}

.kb-menu-item.danger {
    color: #dc2626;
}

.kb-menu-item.danger:hover {
    background-color: rgba(220, 38, 38, 0.06);
    color: #dc2626;
}

.kb-menu-item.danger:active {
    background-color: rgba(220, 38, 38, 0.1);
}

/* 悬浮动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
} 